package service

import "bc/dao"

type role struct {

}
func (r *role) Create(f map[string]interface{}) (bool,int) {

	b,id := dao.RoleDao.Create(f)
	return b,id

}
func (r *role) Find(w map[string]interface{},page int,pageSize int)([]*dao.Role,int,error){

	d,t,err := dao.RoleDao.Find(w,page,pageSize)
	if err != nil{
		return d,0,err
	}
	return d,t,nil
}
func (r *role) First(w map[string]interface{},f []string) (bool,*dao.Role){

	b,d :=dao.RoleDao.First(w,f)
	return b,d

}
func (r *role) Delete(w map[string]interface{}) bool {
	b := dao.RoleDao.Delete(w)
	return b
}
func (r *role) Update (w map[string]interface{},f map[string]interface{}) bool {
	b := dao.RoleDao.Update(w,f)
	return b
}
var RoleService = &role{}
